<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Title</title>
    <script src="//cdn.bootcss.com/jquery/2.1.2/jquery.min.js"></script>
</head>
<body>

<input id="sendToFatherMsg" type="button" value="发送信息给父窗口" >

<script>
    
    $(function () {
        if (opener){

            var data = {
                a:"dsdasd",
                b:"dsdegege"
            }
            console.info(opener.EventBus);
            opener.EventBus.dispatch("secondOpenEvent",data);

            opener.EventBus.addEventListener("sendToSecondEvent", function (data) {
                console.info(data);
                alert(data.target);
            });
            
            $("#sendToFatherMsg").on("click",function () {
                opener.EventBus.dispatch("sendToFatherMsgEvent","你好吗父窗口");
            });
        }
    });
    
</script>

</body>
</html>